package com.sl.au.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.sl.au.entity.BusinesssellerBaseInfo;
import com.sl.au.entity.Evaluate;;

public interface EvaluateRepository extends JpaRepository<Evaluate, String>{
	
	@Query("select a from Evaluate a where a.businesssellerBaseInfo.id=?1")
	Evaluate getInfoByBusinessseller(String id);
	
	@Query("select a from Evaluate a where a.businesssellerBaseInfo.managementPerson.name like %?1% or a.evaluateLevel.title like %?1% or a.businesssellerBaseInfo.shopName like %?1%")
	Page<Evaluate> getByKey(String key,Pageable pageable);
}
